/*
 * panListaTrabajadores.java
 *
 * Created on 22 de mayo de 2007, 09:24 AM
 */

package legajopersonal;
import javax.swing.*;
import sistemarrhh.SistemaRRHH;

/**
 *
 * @author  Administrador
 */
public class jPListaTrabajadores extends Panel_Legajo {
    
    /** Creates new form panListaTrabajadores */
    public jPListaTrabajadores() {
        initComponents();
    }
    /*public panListaTrabajadores(JFrmLegajo ven, JIFrmLegajo venInter) {
        this.ven = ven;
        this.venInter = venInter;        
        initComponents();        
        CargarTabla();
    }*/
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        btnGroupLista = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        RbtnUnidad = new javax.swing.JRadioButton();
        rbtnzonales = new javax.swing.JRadioButton();
        rbtnLocalidades = new javax.swing.JRadioButton();
        jLabel2 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        rbtnRegimen = new javax.swing.JRadioButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        btnSalirListaTrab = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbListaTrabajadores = new javax.swing.JTable();

        this.btnGroupLista.add(this.RbtnUnidad);
        this.btnGroupLista.add(this.rbtnzonales);
        this.btnGroupLista.add(this.rbtnLocalidades);
        this.btnGroupLista.add(this.rbtnRegimen);

        jLabel1.setFont(new java.awt.Font("Verdana", 1, 14));
        jLabel1.setText("Trabajadores de la EPS GRAU");

        RbtnUnidad.setText("Unidad Organizativa");
        RbtnUnidad.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        RbtnUnidad.setMargin(new java.awt.Insets(0, 0, 0, 0));

        rbtnzonales.setText("Zonales");
        rbtnzonales.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        rbtnzonales.setMargin(new java.awt.Insets(0, 0, 0, 0));

        rbtnLocalidades.setText("Localidades");
        rbtnLocalidades.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        rbtnLocalidades.setMargin(new java.awt.Insets(0, 0, 0, 0));

        jLabel2.setText("Nombre");

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Piura", "Sullana", "Talara", "Paita" }));

        rbtnRegimen.setText("Regimen");
        rbtnRegimen.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        rbtnRegimen.setMargin(new java.awt.Insets(0, 0, 0, 0));

        jButton1.setText("Eliminar");

        jButton2.setText("Imprimir");

        btnSalirListaTrab.setText("Salir");
        btnSalirListaTrab.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalirListaTrabActionPerformed(evt);
            }
        });

        jButton4.setText("Actualizar");

        jButton5.setText("Nuevo");

        jScrollPane1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        tbListaTrabajadores.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(tbListaTrabajadores);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(328, 328, 328)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(390, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addGap(52, 52, 52)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(RbtnUnidad)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 373, Short.MAX_VALUE)
                        .addComponent(jLabel2)
                        .addGap(21, 21, 21)
                        .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(187, 187, 187))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(rbtnzonales)
                            .addComponent(rbtnLocalidades)
                            .addComponent(rbtnRegimen))
                        .addContainerGap(835, Short.MAX_VALUE))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addGap(34, 34, 34)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 858, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap(523, Short.MAX_VALUE)
                        .addComponent(jButton5)
                        .addGap(16, 16, 16)
                        .addComponent(jButton4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnSalirListaTrab)))
                .addGap(68, 68, 68))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(37, 37, 37)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(RbtnUnidad)
                    .addComponent(jLabel2)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtnzonales)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtnLocalidades)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(rbtnRegimen)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(44, 44, 44)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSalirListaTrab)
                    .addComponent(jButton2)
                    .addComponent(jButton1)
                    .addComponent(jButton4)
                    .addComponent(jButton5))
                .addGap(25, 25, 25))
        );
    }// </editor-fold>//GEN-END:initComponents
   public void CargarTabla(){
        //tbModel = new Util.JBDTable(ven.cn);
        //tbModel.formaMiTabla(ven.cn, "Select *from Persona");
        //tbListaTrabajadores.setBorder(javax.swing.BorderFactory.createEtchedBorder());  
        tbListaTrabajadores.setModel(tbModel.formaMiTabla("Select * from Persona"));
      //  tbListaTrabajadores.setModel(tbModel.formaMiTabla("Select * From Persona"));
        //scpListaTrabajadores.setViewportView(tbListaTrabajadores);
        System.out.println("xxxxxxxxxx1");
    }
    private void btnSalirListaTrabActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalirListaTrabActionPerformed
// TODO add your handling code here:
        //venInter.dispose();
        this.cerrarPadre();
        //legajopersonal.JFrmLegajo.HabilitarMenuBar();
    }//GEN-LAST:event_btnSalirListaTrabActionPerformed
       
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton RbtnUnidad;
    private javax.swing.ButtonGroup btnGroupLista;
    private javax.swing.JButton btnSalirListaTrab;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JRadioButton rbtnLocalidades;
    private javax.swing.JRadioButton rbtnRegimen;
    private javax.swing.JRadioButton rbtnzonales;
    private javax.swing.JTable tbListaTrabajadores;
    // End of variables declaration//GEN-END:variables
    public SistemaRRHH ven;
    //utiles.conexionRmiJdbc conec;
    //public JIFrmLegajo venInter;
    public Util_Francisco.JBDTable tbModel;
}
